//------------------------------------------------------------------------
/*
	Author:	Philipp Hannemann
	Date:	14.11.2012
	Beschreibung: 

*/
//------------------------------------------------------------------------
#ifndef Figure_h_
#define Figure_h_ Figure_h_
//------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------
#include "IrrlichtHeader.h"
#include "Misc.h"
#include "Camera.h"

#include <vector>
//------------------------------------------------------------------------
// Macros
//------------------------------------------------------------------------

//------------------------------------------------------------------------
// Misc
//------------------------------------------------------------------------

//------------------------------------------------------------------------
class Figure : public Entity, public NonCopyable//, public ISceneNode
{
	static int ID_Counter;
public:
	typedef std::vector<std::vector<bool>> VecBool2D;
	typedef std::vector<std::unique_ptr<Figure>> FigurePointerVec;

	static FigurePointerVec createFigures(IrrlichtDevice * const dev, ITriangleSelector * const selector);

public:
	void yaw(bool common = true);
	void pitch(bool common = true);
	void roll(bool common = true);

	void move(float timefactor, vector2df move, Camera const& cam); 

public:
	int getID() const;

private:
	VecBool2D m_binaryFigure;

	IMeshSceneNode * m_fig;

private:
	Figure(VecBool2D const& binaryFigure, ITriangleSelector * const selector, IrrlichtDevice * const dev);
	void createMesh();
};
//------------------------------------------------------------------------
#endif // Figure_h_
